FileCopy is a XCMD allowing to copy any file between two volumes or directories.
SYNTAX
FileCopy <prov file> [,«dest path or name»][,«replace»]
[,«"DontResolveAlias"»][,«"DontShowProgress"»]
PARAMETERS
«» params are order-independants.
<prov file> can be a single name or whole pathname. If just a single name is supplied, the file is assumed to be in the same folder than the current stack.
«dest path or name» is optional. If not supplied, the file will be copied in the same folder as "Copy of...". If a single name is passed, the copy of the file will take that new name in the same folder. If the second param end with colon, the file will be copied in the designed folder and will keep its original name. Finally, a whole pathname can be provided to define both dest. directory and new file name.
«replace» is a boolean allowing to automatically replace any existing file. Default is FALSE.
«"dontResolveAlias"» allows to deal with an alias file itself (System 7.0 only) rather than with the file pointed by it.
«"DontShowProgress"» allows to hide progress dialog.
Using "!", "?" or "=" as first parameter will return an online help (resp. copyright, syntax and output).
USING
If the copy is successfull, the Result will contain the full pathname of the destination file.
ERRORS
If an error occurs, the Result can return :
"Error : Not a file"
"Error : Not a folder"
"Error : Alias file not supported"
"Error : Volume not found"
"Error : Bad Name"
"Error : File not found"
"Error : Folder not found"
"Error : File is busy"
"Error : I/O Error"
"Error : Volume is full"
"Error : Volume is locked"
"Error : No resource fork"
"Error : Duplicate file/folder name"
"Error : Moving whole volume not allowed"
"Error : Not an AppleShare volume"
"Error : AppleShare insufficient privileges"
"Error : No more disk space"
"Error : Missing or empty parameter(s)"
"Error : Couln't create copy buffer"
HISTORY
2.7 02/24/94
• Fixed destination free space calculation when file has to be replaced
• Fixed the dialog location when the card is hidden
2.6 12/10/92
• Fixed bug with copy of an empty file
• FileCopy is now able to copy currently opened files
• Inited bit set to false on created file
2.5 11/16/92
• Fixed bug with copy in a drop-in shared folder
2.4 10/26/92
• Copy keeps files dates
2.3 10/01/92
• Fixed minor bug
• Checking is done before Progress dialog appears
2.2 09/28/92
• Fixed minor bug
• Enhanced Progress dialog
2.1 09/22/92
• Enhanced speed by using maximum available memory
• Added Progress dialog
2.0 06/19/92
• Enhanced to allow copy in an AppleShare drop-folder
1.9 03/13/92
• Removed forgotten DebugStr (grin !)
1.8 03/07/92
• Enhanced destination param parser
1.7 12/25/91
• Fixed alias file bug under System 7.0.1
1.6 11/22/91
• Fixed destination volume freespace calculation
1.5 10/29/91
• Copied file now preserves modification date.
1.4 10/28/91
• Copied file now preserves creation date.
1.3 08/04/91
• Added support for System 7.0 alias files
• General enhancement of the code
• Added "DontResolveAlias" parameter
• Added "=" param for online help
1.2
• Keeps previous file attributes (dates)
1.1
• Replace param added to provide automatic replacement of previous file with a same name.
Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses: